package edzest.basic;

public class Ex72_OOP {
	// 객체 생성 및 객체 다루기
	public static void main(String[] agrs){
		Ex72_Rectangle rec = new Ex72_Rectangle(10, 20, "BLACK");
		System.out.println(rec.width);
		System.out.println(rec.height);
		System.out.println(rec.color);
		System.out.println(rec.getArea());
		System.out.println(rec.getCircum());
	}
}

class Ex72_Rectangle{
	double width;
	double height;
	String color;
	
	double getArea(){
		double area = width*height;
		return area;
	}
	
	double getCircum(){
		double circum = 2*width + 2*height;
		return circum;
	}
	public Ex72_Rectangle(double width, double height, String color) {
		this.width = width;
		this.height = height;
		this.color = color;
	}
}

class Ex73_Fan{
	final int SLOW;
	final int MEDIUM;
	final int FAST;
	int speed;
	boolean on;
	double radius;
	String color;
	public Ex73_Fan() {
		SLOW = 1;
		speed = SLOW;
		MEDIUM = 2;
		FAST = 3;
		on = false;
		radius = 5.0;
		color = "blue";
	}
}

class Ex74_Account{
	String aid;
	int balance;
	int interestRate;
	String dateCreated;
	public Ex74_Account() {
		aid = "0";
		balance = 0;
		interestRate = 0;
	}
}

class Ex75_Stock{
	String name;
	int previousClosingPrice;
	int currentPrice;
}
